package com.sky.mapper;

import com.sky.anno.AutoFill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface CategoryMapper {
    //分类条件分页查询
    List<Category> findByPage(CategoryPageQueryDTO categoryPageQueryDTO);

    //新增分类
    @AutoFill(value = OperationType.INSERT)
    void add(Category category);
    //修改分类
    @AutoFill(value = OperationType.UPDATE)
    void update(Category category);
    //删除分类
    void delete(Long id);
    //根据类型查询分类
    List<Category> list(Integer type);
}
